package com.zzxx.wechat.dao;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zzxx.wechat.entity.Commodity;
import com.zzxx.wechat.mapper.CommodityMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class CommodityDao extends ServiceImpl<CommodityMapper, Commodity> implements IService<Commodity> {

    public List<Commodity> queryByNewCommodityAddressId(Integer newCommodityAddressIds) {
        return lambdaQuery()
                .eq(Commodity::getNewCommodityAddressId, newCommodityAddressIds)
                .list();
    }

    public List<Commodity> queryByPIds(List<String> pIds) {
        return lambdaQuery()
                .in(Commodity::getPid, pIds)
                .list();
    }

}
